package terminal.communication;

import java.util.UUID;

import terminal.gui.ConnectionStatusWindow;
import terminal.gui.MainWindow;
import core.communication.message.ElectionCardMessage;
import core.communication.message.Message;
import core.communication.message.TerminalRegistrationMessage;
import core.exceptions.CommunicationInitiationException;
import core.exceptions.PortInUseException;

public interface CommunicationService {

	public void setUp(String serverIp, String serverPort, String clientIp, String clientPort, UUID communicationToken, ConnectionStatusWindow connectionStatusWindow)
			throws CommunicationInitiationException, PortInUseException;

	public void shutDown();

	public Message getMessageToSend();

	public Client getRKWClient();

	public void removeMessageToSend(Message message);

	public void resendMessage(Message message);

	public Message getReceivedMessage();

	public void removeReceivedMessage(Message message);

	public String getServerURI();

	public void addReceivedMessage(Message message);

	public void send(Message message);

	public void handleTerminalRegistrationMessage(TerminalRegistrationMessage message);

	public void askForElectionCard(MainWindow mainWindow);

	public void handleElectionCardMessage(ElectionCardMessage message);

	public void sendVote(String vote, UUID token, MainWindow mainWindow);
}
